﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OgonPhonesXML.Aastra.Serializer
{
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class AastraIPPhoneConfiguration
    {
        private AastraIPPhoneConfigurationConfigurationItem[] configurationItemField;
        private List<AastraIPPhoneConfigurationConfigurationItem> listItemConfiguration = new List<AastraIPPhoneConfigurationConfigurationItem>();
        private string beepField;

        private string triggerDestroyOnExitField;

        private string type;

        public AastraIPPhoneConfiguration()
        {
            this.beepField = "no";
            this.triggerDestroyOnExitField = "no";
            this.type = "local";
        }
        public void addConfigurationItem(string parameter, string value)
        {
            AastraIPPhoneConfigurationConfigurationItem provItem = new AastraIPPhoneConfigurationConfigurationItem();
            provItem.Parameter = parameter;
            provItem.Value = value;
            listItemConfiguration.Add(provItem);
            
        }
        public void addConfigurationItem(string parameter, string value, string type)
        {
            AastraIPPhoneConfigurationConfigurationItem provItem = new AastraIPPhoneConfigurationConfigurationItem();
            provItem.Parameter = parameter;
            provItem.Value = value;
            provItem.setType = type;
            listItemConfiguration.Add(provItem);
        }
        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("ConfigurationItem", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public AastraIPPhoneConfigurationConfigurationItem[] ConfigurationItem
        {
            get
            {
                this.configurationItemField = listItemConfiguration.ToArray();
                return this.configurationItemField;
            }
            set
            {
                this.configurationItemField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string Beep
        {
            get
            {
                return this.beepField;
            }
            set
            {
                this.beepField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string triggerDestroyOnExit
        {
            get
            {
                return this.triggerDestroyOnExitField;
            }
            set
            {
                this.triggerDestroyOnExitField = value;
            }
        }

        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("remote")]
        public string setType
        {
            get
            {
                return this.type;
            }
            set
            {
                this.type = value;
            }
        }
    }
}
